<extend name="Public/base" />

<block name="style">
    <link href="__STATIC__/iCheck/skins/flat/green.css" rel="stylesheet">
</block>
<block name="body">

    <div class="right_col" role="main">
        <div class="">


            <div class="clearfix"></div>
           




            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>创建菜单 <small>Create menu</small></h2>

                        <ul class="nav navbar-right panel_toolbox">
                            <li class="">
                                <a href="{:U('Adv/add')}"><button type="button" class="btn btn-success"><i class="fa fa-edit"></i>&nbsp;添加广告位</button></a>
                            </li>  
                                                        
                             <li class="">
                                <a href="{:U('Adv/delAll')}" class='del_common_all'><button type="button" class="btn btn-danger"><i class="fa fa-trash-o"></i>&nbsp;全部禁用</button></a>
                            </li>

                            <li class="">
                                <a href="{:U('Adv/delAll')}" class='del_common_all'><button type="button" class="btn btn-danger"><i class="fa fa-trash-o"></i>&nbsp;全部删除</button></a>
                            </li>
                        </ul>
                        <div class="clearfix"></div>
                    </div>


                    <div class="x_content">

<form class="ids">
                        <div class="table-responsive">
                            <table class="table table-striped jambo_table bulk_action">
                                <thead>
                                    <tr class="headings">
                                        <th>
                                            <input type="checkbox" id="check-all" class="flat">
                                        </th>
                             
                                        <th class="column-title">广告位名称 </th>
                                        <th class="column-title">类别 </th>
                                        <th class="column-title">展示方式 </th>
                                        <th class="column-title">宽度/字数 </th>
                                        <th class="column-title">高度 </th>
                                        <th class="column-title">状态 </th>
                                     <th class="column-title">创建时间 </th>
                                       
                                        <th class="column-title no-link last"><span class="nobr">操作</span>
                                        </th>
                                        <th class="bulk-actions" colspan="12">
                                            <a class="antoo" style="color:#fff; font-weight:500;">Bulk Actions ( <span class="action-cnt"> </span> ) <i class="fa fa-chevron-down"></i></a>
                                        </th>
                                    </tr>
                                </thead>

                                <tbody>
                                <notempty name="_list">
                                <volist name='_list' id='vo'> 
                                    <tr class="even pointer  del_id_{$vo.ap_id}">
                                        <td class="a-center ">
                                            <input type="checkbox" class="ids flat"  name="id[]" value='{$vo.ap_id}'>
                                        </td>
                                       
                                        <td class=" "><a href="{:U('Adv/index',array('pid'=>$vo['ap_id']))}">{$vo.ap_name}</a></td>
                                       <td class=" ">{$vo.ap_class=='1'?'文字':'图片'}</td>
                                        <td class=" ">{$vo.ap_display=='1'?'多条广告并随机展示':'展示一条广告'}</td>
                                        <td class=" ">{$vo.ap_width}</td>
                                        <td class=" ">{$vo.ap_height}</td>
                                       
                                        <td class=" ">

                                         <a href="{:U('changeStatus?method=advpstionStatus&id='.$vo['ap_id'].'&status='.$vo['is_use'])}" class='btn   {$vo.is_use==1?'btn-success':'btn-warning'}  btn-xs common_href_comfirm' titles="您将'{$vo.is_use==1?'禁用':'启用'}'本条记录?" content="确认{$vo.is_use==1?'禁用':'启用'}">{$vo.is_use==1?'启用':'禁用'}</a><br>
                                        </td>
                                       
                             <td class=" ">{$vo.create_time|time_format}</td>
                                        <td>
                                             <a href="{:U('Adv/sysmanage',array('ap_id'=>$vo['ap_id']))}" class="btn btn-primary btn-xs " ><i class="fa fa-pencil"></i>管理广告</a>
                                            <a href="{:U('Adv/edit',array('ap_id'=>$vo['ap_id']))}" class="btn btn-info btn-xs " ><i class="fa fa-pencil"></i>编辑</a>
                                            <a href="{:U('changeStatus?method=deleteAdvPosition&id='.$vo['ap_id'])}" class="btn btn-danger btn-xs  del_common_tr" ><i class="fa fa-trash-o"></i>删除</a>
                                           <a href="{:U('Adv/edit',array('id'=>$vo['ap_id']))}" class="btn btn-warning btn-xs " ><i class="fa fa-pencil"></i>获取js调用</a>
                                        </td>
                                    </tr>
                                </volist>
                                
                                    <else /> 
                                <tr class="even pointer  del_id_{$vo.id}">
                                <td  colspan="12">
                                    无相关记录
                                     </td>
                                        </tr>
                                </notempty>
                                </tbody>
                            </table>
                        </div>
</form>


                        <nav>
                            <ul class="pagination">
                               {$_page}
                            </ul>
                        </nav>          
                    </div>    
                </div>   
            </div>
            
            
            
            
            
            
            
        </div>
    </div>
</div>
</block>
<block name="script"> 

    <script src="__STATIC__/iCheck/icheck.min.js"></script>
    <script>
        Lzy.highlight_subnav('{:U('Adv/index')}');
    </script>
</block>